package com.exam.online.system.service;

import com.exam.online.system.entity.Paper;
import com.exam.online.system.model.request.PaperSubmitModel;
import com.exam.online.system.model.request.ReviewPaperModel;
import com.exam.online.system.util.PageModel;
import com.exam.online.system.util.ResponseModel;

import java.util.List;

/**
 * @author yuzhen
 * @date 2019/5/6
 */
public interface PaperService {

    Paper savePaper(String name, String content, String courseName, Integer teacherId, Integer testTime, String questionIds);

    /**
     * 学生提交试卷
     *
     * @param userId
     * @param paperId
     * @param model
     * @return
     */
    ResponseModel calculateScore(Integer userId, Integer paperId, List<PaperSubmitModel.QuestionAnswerModel> model);

    PageModel listUnExamPaper(Integer stuId, Integer pageNo, Integer pageSize);

    PageModel listIsExamPaper(Integer stuId, Integer pageNo, Integer pageSize);

    ResponseModel issuePaper(Integer paperId);

    ResponseModel getPaperDetail(Integer paperId);

    ResponseModel checkMarks(Integer paper, Integer stuId);

    PageModel stuScoreList(Integer teacherId, Integer pageNo, Integer pageSize);

    void submitScore(ReviewPaperModel reviewPaperModel);

    PageModel findPaperByTeacherId(Integer teacherId,Integer pageNo,Integer pageSize);
}
